extends "../i_bangleh25_Hide/i_bangleh25_Hide.gd"

func init():
	.init()
	name = "火手镯·爆"
	resetdata()
	info = "火焰爆发：[主动]为所有敌人附加1层<烧灼>[cd:4秒][被动]所有攻击20%概率使被攻击者十字范围内的队友附加1层<火种>\n" + info

func _connect():
	._connect()
	masCha.connect("onAtkChara",self,"addbing2")

func _upS():
	._upS()
	cnt3 += 1
	if cnt3 == 4:
		cnt3 = 0
		var chas = masCha.getAllChas(1)
		for i in chas:
			i.addBuff(b_shaoZhuo.new(1))
					
func addbing2(atkinfo):
	if atkinfo.isMiss || atkinfo.atkType == Chara.AtkType.EFF:return
	if sys.rndPer(20):
		var lf = 3
		if masCha.hasBuff("HY"):lf = 6
		var chas = atkinfo.hitCha.getCellChas(atkinfo.hitCha.cell,1,2)
		var exdmg = masCha.att.atk * 0.1
		for i in chas:
			if i == atkinfo.hitCha:continue
			var bf = i.hasBuff("b_huozhong")
			if !bf:
				var tmp = 0
				for j in huolist:
					var bf2 = i.hasBuff(j)
					if bf2:
						bf2.isDel = true
						tmp = 1
				if tmp:
					masCha.hurtChara(i,i.att.maxHp * 0.05 + exdmg,Chara.HurtType.REAL,Chara.AtkType.EFF)
					return
				i.addBuff(ctrl.b_huozhong.new(lf,1,exdmg,null))
			else:
				bf.cnt += 1
				bf.life += lf
					